<template>
  <div id="layout">
    <el-container>
      <el-aside width="200px" style="background-color:#ff6666">
        <el-menu>
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <router-link tag="span" to="/home" active-class="active" class="span-home">首页</router-link>
            </template>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-document"></i>
              <span>数据管理</span>
            </template>
            <el-menu-item-group>
              <router-link tag="el-menu-item" to="/userlist" index="2-1" active-class="act">用户列表</router-link>
              <router-link tag="el-menu-item" to="/shoplist" index="2-2" active-class="act">商家列表</router-link>
              <router-link tag="el-menu-item" to="/foodlist" index="2-3" active-class="act">食品列表</router-link>
              <router-link tag="el-menu-item" to="/orderlist" index="2-4" active-class="act">订单列表</router-link>
              <router-link
                tag="el-menu-item"
                to="/administarlsit"
                index="2-5"
                active-class="act"
              >管理员列表</router-link>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-plus"></i>
              <span>添加数据</span>
            </template>
            <el-menu-item-group>
              <router-link tag="el-menu-item" to="/addstore" index="3-1" active-class="act">添加商铺</router-link>
              <router-link tag="el-menu-item" to="/addshop" index="3-2" active-class="act">添加商品</router-link>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-star-on"></i>
              <span>图表</span>
            </template>
            <el-menu-item-group>
              <router-link tag="el-menu-item" to="/chart" index="4-1" active-class="act">用户分布</router-link>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span>编辑</span>
            </template>
            <el-menu-item-group>
              <router-link tag="el-menu-item" to="/edit" index="5-1" active-class="act">文本编辑</router-link>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="6">
            <template slot="title">
              <i class="el-icon-setting"></i>
              <span>设置</span>
            </template>
            <el-menu-item-group>
              <router-link tag="el-menu-item" to="/set" index="6-1" active-class="act">管理员设置</router-link>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="7">
            <template slot="title">
              <i class="el-icon-warning"></i>
              <span>说明</span>
            </template>
            <el-menu-item-group>
              <router-link tag="el-menu-item" to="/explain" index="7-1" active-class="act">说明</router-link>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-container class="right-box">
        <el-header style="text-align: right; font-size: 12px">
          <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>数据管理</el-breadcrumb-item>
            <el-breadcrumb-item>用户列表</el-breadcrumb-item>
            <span>
              <img src="https://elm.cangdu.org/img/default.jpg" class="avator" />
            </span>
          </el-breadcrumb>
        </el-header>
        <router-view></router-view>
      </el-container>
    </el-container>
  </div>
</template>
<script>
export default {
  name: "Layout",
  
};
</script>

<style lang="stylus">
.el-container {
  height: 100%;
  .el-header {
    background-color: #ff9966;
    color: #333;
    line-height: 60px;
  }

  .el-aside {
    color: #333;
    overflow: visible;
    height: 100%;
    position fixed
    top 0
    left 0

    .el-menu {
      background-color: #ff6666;
      border-right: 0;

      .el-menu--inline {
        background: #ff9966;
      }

      .el-menu-item-group__title {
        padding: 0;
      }

      .el-submenu__title {
        text-align: left;
        padding: 0 !import;
        font-size: 18px;
        font-weight: bolder;
      }

      .el-submenu__title:hover {
        background-color: #ff3366;
        color: #ffcc66;

        i {
          color: black;
        }
      }

      .el-menu-item {
        position: relative;
        text-align: center;
        font-size: 16px;
        background-color: #ff9966;
      }

      .el-menu-item:hover {
        background-color: #ffcc66;
      }

      .active {
        color: #ffcc66;
      }

      .act {
        background-color: #ffcc66;
        color: #ff0066;
      }

      .span-home {
        padding: 20px 50px 20px 20px;
      }
    }
  }
}

.avator {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 30px;
  margin-top: 12px;
}
.el-breadcrumb
   height 100%
   line-height 60px
   font-size 16px
.right-box
    margin-left 200px
</style>